package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IContractService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component("updateContractStatusJob")
@Slf4j
public class updateContractStatus {
    @Autowired
    IContractService contractService;
//    @Scheduled(cron = "0 0 0 * * ?")
    //这里若依系统上设置即可
    public void updateContractStatus() {
        contractService.updateContractStatus();
        log.info("定时更新合同状态成功！");
    }
}
